<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>LGraph</title>
    <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="icon" href="../assets/favicon.ico">
    <script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script>
</head>
<body class="yui3-skin-sam">

<div id="doc">
    <div id="hd" class="yui3-g header">
        <div class="yui3-u-3-4">
                <h1><img src="../assets/css/logo.png" title="" width="117" height="52"></h1>
        </div>
        <div class="yui3-u-1-4 version">
            <em>API Docs for: </em>
        </div>
    </div>
    <div id="bd" class="yui3-g">

        <div class="yui3-u-1-4">
            <div id="docs-sidebar" class="sidebar apidocs">
                <div id="api-list">
                    <h2 class="off-left">APIs</h2>
                    <div id="api-tabview" class="tabview">
                        <ul class="tabs">
                            <li><a href="#api-classes">Classes</a></li>
                            <li><a href="#api-modules">Modules</a></li>
                        </ul>
                
                        <div id="api-tabview-filter">
                            <input type="search" id="api-filter" placeholder="Type to filter APIs">
                        </div>
                
                        <div id="api-tabview-panel">
                            <ul id="api-classes" class="apis classes">
                                <li><a href="../classes/ContextMenu.html">ContextMenu</a></li>
                                <li><a href="../classes/LGraph.html">LGraph</a></li>
                                <li><a href="../classes/LGraphCanvas.html">LGraphCanvas</a></li>
                                <li><a href="../classes/LGraphNode.html">LGraphNode</a></li>
                                <li><a href="../classes/LiteGraph.html">LiteGraph</a></li>
                            </ul>
                
                
                            <ul id="api-modules" class="apis modules">
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="yui3-u-3-4">
                <div id="api-options">
                    Show:
                    <label for="api-show-inherited">
                        <input type="checkbox" id="api-show-inherited" checked>
                        Inherited
                    </label>
            
                    <label for="api-show-protected">
                        <input type="checkbox" id="api-show-protected">
                        Protected
                    </label>
            
                    <label for="api-show-private">
                        <input type="checkbox" id="api-show-private">
                        Private
                    </label>
                    <label for="api-show-deprecated">
                        <input type="checkbox" id="api-show-deprecated">
                        Deprecated
                    </label>
            
                </div>
            
            <div class="apidocs">
                <div id="docs-main">
                    <div class="content">
<h1>LGraph Class</h1>
<div class="box meta">


        <div class="foundat">
            Defined in: <a href="../files/.._src_litegraph.js.html#l438"><code>..&#x2F;src&#x2F;litegraph.js:438</code></a>
        </div>


</div>


<div class="box intro">
    <p>LGraph is the class that contain a full graph. We instantiate one and add nodes to it, and then we can run the execution loop.</p>

</div>

    <div class="constructor">
        <h2>Constructor</h2>
<div id="method_LGraph" class="method item">
    <h3 class="name"><code>LGraph</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>o</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l438"><code>..&#x2F;src&#x2F;litegraph.js:438</code></a>
        </p>



    </div>

    <div class="description">
        
    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">o</code>
                        <span class="type">Object</span>


                    <div class="param-description">
                        <p>data from previous serialization [optional]</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
    </div>

<div id="classdocs" class="tabview">
    <ul class="api-class-tabs">
        <li class="api-class-tab index"><a href="#index">Index</a></li>

            <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
    </ul>

    <div>
        <div id="index" class="api-class-tabpanel index">
            <h2 class="off-left">Item Index</h2>

                <div class="index-section methods">
                    <h3>Methods</h3>

                    <ul class="index-list methods">
                            <li class="index-item method">
                                <a href="#method_add">add</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_addGlobalInput">addGlobalInput</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_addOutput">addOutput</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_arrange">arrange</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_attachCanvas">attachCanvas</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_changeInputType">changeInputType</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_changeOutputType">changeOutputType</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_clear">clear</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_clearTriggeredSlots">clearTriggeredSlots</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_configure">configure</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_detachCanvas">detachCanvas</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_findNodesByClass">findNodesByClass</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_findNodesByTitle">findNodesByTitle</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_findNodesByType">findNodesByType</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getAncestors">getAncestors</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getElapsedTime">getElapsedTime</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getFixedTime">getFixedTime</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getGroupOnPos">getGroupOnPos</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getInputData">getInputData</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getNodeById">getNodeById</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getNodeOnPos">getNodeOnPos</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getOutputData">getOutputData</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getTime">getTime</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_isLive">isLive</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_remove">remove</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_removeInput">removeInput</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_removeLink">removeLink</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_removeOutput">removeOutput</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_renameInput">renameInput</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_renameOutput">renameOutput</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_runStep">runStep</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_sendEventToAllNodes">sendEventToAllNodes</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_serialize">serialize</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_setGlobalInputData">setGlobalInputData</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_setOutputData">setOutputData</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_start">start</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_stop execution">stop execution</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_updateExecutionOrder">updateExecutionOrder</a>

                            </li>
                    </ul>
                </div>



        </div>

            <div id="methods" class="api-class-tabpanel">
                <h2 class="off-left">Methods</h2>

<div id="method_add" class="method item">
    <h3 class="name"><code>add</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>node</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1004"><code>..&#x2F;src&#x2F;litegraph.js:1004</code></a>
        </p>



    </div>

    <div class="description">
        <p>Adds a new node instasnce to this graph</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">node</code>
                        <span class="type"><a href="../classes/LGraphNode.html" class="crosslink">LGraphNode</a></span>


                    <div class="param-description">
                        <p>the instance of the node</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_addGlobalInput" class="method item">
    <h3 class="name"><code>addGlobalInput</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
                <li class="arg">
                        <code>type</code>
                </li>
                <li class="arg">
                        <code>value</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1251"><code>..&#x2F;src&#x2F;litegraph.js:1251</code></a>
        </p>



    </div>

    <div class="description">
        <p>Tell this graph it has a global graph input of this type</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">type</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">value</code>
                        <span class="type"></span>


                    <div class="param-description">
                        <p>[optional]</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_addOutput" class="method item">
    <h3 class="name"><code>addOutput</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
                <li class="arg">
                        <code>type</code>
                </li>
                <li class="arg">
                        <code>value</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1375"><code>..&#x2F;src&#x2F;litegraph.js:1375</code></a>
        </p>



    </div>

    <div class="description">
        <p>Creates a global graph output</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">type</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">value</code>
                        <span class="type"></span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_arrange" class="method item">
    <h3 class="name"><code>arrange</code></h3>

        <span class="paren">()</span>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l885"><code>..&#x2F;src&#x2F;litegraph.js:885</code></a>
        </p>



    </div>

    <div class="description">
        <p>Positions every node in a more readable manner</p>

    </div>




</div>
<div id="method_attachCanvas" class="method item">
    <h3 class="name"><code>attachCanvas</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>graph_canvas</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l531"><code>..&#x2F;src&#x2F;litegraph.js:531</code></a>
        </p>



    </div>

    <div class="description">
        <p>Attach Canvas to this graph</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">graph_canvas</code>
                        <span class="type">GraphCanvas</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_changeInputType" class="method item">
    <h3 class="name"><code>changeInputType</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
                <li class="arg">
                        <code>type</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1333"><code>..&#x2F;src&#x2F;litegraph.js:1333</code></a>
        </p>



    </div>

    <div class="description">
        <p>Changes the type of a global graph input</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">type</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_changeOutputType" class="method item">
    <h3 class="name"><code>changeOutputType</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
                <li class="arg">
                        <code>type</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1450"><code>..&#x2F;src&#x2F;litegraph.js:1450</code></a>
        </p>



    </div>

    <div class="description">
        <p>Changes the type of a global graph output</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">type</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_clear" class="method item">
    <h3 class="name"><code>clear</code></h3>

        <span class="paren">()</span>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l468"><code>..&#x2F;src&#x2F;litegraph.js:468</code></a>
        </p>



    </div>

    <div class="description">
        <p>Removes all nodes from this graph</p>

    </div>




</div>
<div id="method_clearTriggeredSlots" class="method item">
    <h3 class="name"><code>clearTriggeredSlots</code></h3>

        <span class="paren">()</span>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1533"><code>..&#x2F;src&#x2F;litegraph.js:1533</code></a>
        </p>



    </div>

    <div class="description">
        <p>clears the triggered slot animation in all links (stop visual animation)</p>

    </div>




</div>
<div id="method_configure" class="method item">
    <h3 class="name"><code>configure</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>str</code>
                </li>
                <li class="arg">
                        <code>returns</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1619"><code>..&#x2F;src&#x2F;litegraph.js:1619</code></a>
        </p>



    </div>

    <div class="description">
        <p>Configure a graph from a JSON string</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">str</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>configure a graph from a JSON string</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">returns</code>
                        <span class="type">Boolean</span>


                    <div class="param-description">
                        <p>if there was any error parsing</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_detachCanvas" class="method item">
    <h3 class="name"><code>detachCanvas</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>graph_canvas</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l550"><code>..&#x2F;src&#x2F;litegraph.js:550</code></a>
        </p>



    </div>

    <div class="description">
        <p>Detach Canvas from this graph</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">graph_canvas</code>
                        <span class="type">GraphCanvas</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_findNodesByClass" class="method item">
    <h3 class="name"><code>findNodesByClass</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>classObject</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Array</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1162"><code>..&#x2F;src&#x2F;litegraph.js:1162</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns a list of nodes that matches a class</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">classObject</code>
                        <span class="type">Class</span>


                    <div class="param-description">
                        <p>the class itself (not an string)</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Array</span>:
                    <p>a list with all the nodes of this type</p>

            </div>
        </div>


</div>
<div id="method_findNodesByTitle" class="method item">
    <h3 class="name"><code>findNodesByTitle</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Array</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1195"><code>..&#x2F;src&#x2F;litegraph.js:1195</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns a list of nodes that matches a name</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>the name of the node to search</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Array</span>:
                    <p>a list with all the nodes with this name</p>

            </div>
        </div>


</div>
<div id="method_findNodesByType" class="method item">
    <h3 class="name"><code>findNodesByType</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>type</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Array</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1178"><code>..&#x2F;src&#x2F;litegraph.js:1178</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns a list of nodes that matches a type</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">type</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>the name of the node type</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Array</span>:
                    <p>a list with all the nodes of this type</p>

            </div>
        </div>


</div>
<div id="method_getAncestors" class="method item">
    <h3 class="name"><code>getAncestors</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Array</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l848"><code>..&#x2F;src&#x2F;litegraph.js:848</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns all the nodes that could affect this one (ancestors) by crawling all the inputs recursively.
It doesnt include the node itself</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Array</span>:
                    <p>an array with all the LGraphNodes that affect this node, in order of execution</p>

            </div>
        </div>


</div>
<div id="method_getElapsedTime" class="method item">
    <h3 class="name"><code>getElapsedTime</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Number</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l950"><code>..&#x2F;src&#x2F;litegraph.js:950</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns the amount of time it took to compute the latest iteration. Take into account that this number could be not correct
if the nodes are using graphical actions</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Number</span>:
                    <p>number of milliseconds it took the last cycle</p>

            </div>
        </div>


</div>
<div id="method_getFixedTime" class="method item">
    <h3 class="name"><code>getFixedTime</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Number</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l939"><code>..&#x2F;src&#x2F;litegraph.js:939</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns the amount of time accumulated using the fixedtime_lapse var. This is used in context where the time increments should be constant</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Number</span>:
                    <p>number of milliseconds the graph has been running</p>

            </div>
        </div>


</div>
<div id="method_getGroupOnPos" class="method item">
    <h3 class="name"><code>getGroupOnPos</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>x</code>
                </li>
                <li class="arg">
                        <code>y</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">LGraphGroup</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1231"><code>..&#x2F;src&#x2F;litegraph.js:1231</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns the top-most group in that position</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">x</code>
                        <span class="type">Number</span>


                    <div class="param-description">
                        <p>the x coordinate in canvas space</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">y</code>
                        <span class="type">Number</span>


                    <div class="param-description">
                        <p>the y coordinate in canvas space</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">LGraphGroup</span>:
                    <p>the group or null</p>

            </div>
        </div>


</div>
<div id="method_getInputData" class="method item">
    <h3 class="name"><code>getInputData</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type"></span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1288"><code>..&#x2F;src&#x2F;litegraph.js:1288</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns the current value of a global graph input</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type"></span>:
                    <p>the data</p>

            </div>
        </div>


</div>
<div id="method_getNodeById" class="method item">
    <h3 class="name"><code>getNodeById</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>id</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1149"><code>..&#x2F;src&#x2F;litegraph.js:1149</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns a node by its id.</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">id</code>
                        <span class="type">Number</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_getNodeOnPos" class="method item">
    <h3 class="name"><code>getNodeOnPos</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>x</code>
                </li>
                <li class="arg">
                        <code>y</code>
                </li>
                <li class="arg">
                        <code>nodes_list</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type"><a href="../classes/LGraphNode.html" class="crosslink">LGraphNode</a></span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1211"><code>..&#x2F;src&#x2F;litegraph.js:1211</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns the top-most node in this position of the canvas</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">x</code>
                        <span class="type">Number</span>


                    <div class="param-description">
                        <p>the x coordinate in canvas space</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">y</code>
                        <span class="type">Number</span>


                    <div class="param-description">
                        <p>the y coordinate in canvas space</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">nodes_list</code>
                        <span class="type">Array</span>


                    <div class="param-description">
                        <p>a list with all the nodes to search from, by default is all the nodes in the graph</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type"><a href="../classes/LGraphNode.html" class="crosslink">LGraphNode</a></span>:
                    <p>the node at this position or null</p>

            </div>
        </div>


</div>
<div id="method_getOutputData" class="method item">
    <h3 class="name"><code>getOutputData</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type"></span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1408"><code>..&#x2F;src&#x2F;litegraph.js:1408</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns the current value of a global graph output</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type"></span>:
                    <p>the data</p>

            </div>
        </div>


</div>
<div id="method_getTime" class="method item">
    <h3 class="name"><code>getTime</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Number</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l929"><code>..&#x2F;src&#x2F;litegraph.js:929</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns the amount of time the graph has been running in milliseconds</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Number</span>:
                    <p>number of milliseconds the graph has been running</p>

            </div>
        </div>


</div>
<div id="method_isLive" class="method item">
    <h3 class="name"><code>isLive</code></h3>

        <span class="paren">()</span>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1514"><code>..&#x2F;src&#x2F;litegraph.js:1514</code></a>
        </p>



    </div>

    <div class="description">
        <p>returns if the graph is in live mode</p>

    </div>




</div>
<div id="method_remove" class="method item">
    <h3 class="name"><code>remove</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>node</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1068"><code>..&#x2F;src&#x2F;litegraph.js:1068</code></a>
        </p>



    </div>

    <div class="description">
        <p>Removes a node from the graph</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">node</code>
                        <span class="type"><a href="../classes/LGraphNode.html" class="crosslink">LGraphNode</a></span>


                    <div class="param-description">
                        <p>the instance of the node</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_removeInput" class="method item">
    <h3 class="name"><code>removeInput</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
                <li class="arg">
                        <code>type</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1353"><code>..&#x2F;src&#x2F;litegraph.js:1353</code></a>
        </p>



    </div>

    <div class="description">
        <p>Removes a global graph input</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">type</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_removeLink" class="method item">
    <h3 class="name"><code>removeLink</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>link_id</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1565"><code>..&#x2F;src&#x2F;litegraph.js:1565</code></a>
        </p>



    </div>

    <div class="description">
        <p>Destroys a link</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">link_id</code>
                        <span class="type">Number</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_removeOutput" class="method item">
    <h3 class="name"><code>removeOutput</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1470"><code>..&#x2F;src&#x2F;litegraph.js:1470</code></a>
        </p>



    </div>

    <div class="description">
        <p>Removes a global graph output</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_renameInput" class="method item">
    <h3 class="name"><code>renameInput</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>old_name</code>
                </li>
                <li class="arg">
                        <code>new_name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1302"><code>..&#x2F;src&#x2F;litegraph.js:1302</code></a>
        </p>



    </div>

    <div class="description">
        <p>Changes the name of a global graph input</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">old_name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">new_name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_renameOutput" class="method item">
    <h3 class="name"><code>renameOutput</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>old_name</code>
                </li>
                <li class="arg">
                        <code>new_name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1422"><code>..&#x2F;src&#x2F;litegraph.js:1422</code></a>
        </p>



    </div>

    <div class="description">
        <p>Renames a global graph output</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">old_name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">new_name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_runStep" class="method item">
    <h3 class="name"><code>runStep</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>num</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l634"><code>..&#x2F;src&#x2F;litegraph.js:634</code></a>
        </p>



    </div>

    <div class="description">
        <p>Run N steps (cycles) of the graph</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">num</code>
                        <span class="type">Number</span>


                    <div class="param-description">
                        <p>number of steps to run, default is 1</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_sendEventToAllNodes" class="method item">
    <h3 class="name"><code>sendEventToAllNodes</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>eventname</code>
                </li>
                <li class="arg">
                        <code>params</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l962"><code>..&#x2F;src&#x2F;litegraph.js:962</code></a>
        </p>



    </div>

    <div class="description">
        <p>Sends an event to all the nodes, useful to trigger stuff</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">eventname</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>the name of the event (function to be called)</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">params</code>
                        <span class="type">Array</span>


                    <div class="param-description">
                        <p>parameters in array format</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_serialize" class="method item">
    <h3 class="name"><code>serialize</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Object</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1582"><code>..&#x2F;src&#x2F;litegraph.js:1582</code></a>
        </p>



    </div>

    <div class="description">
        <p>Creates a Object containing all the info about this graph, it can be serialized</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Object</span>:
                    <p>value of the node</p>

            </div>
        </div>


</div>
<div id="method_setGlobalInputData" class="method item">
    <h3 class="name"><code>setGlobalInputData</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
                <li class="arg">
                        <code>data</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1274"><code>..&#x2F;src&#x2F;litegraph.js:1274</code></a>
        </p>



    </div>

    <div class="description">
        <p>Assign a data to the global graph input</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">data</code>
                        <span class="type"></span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_setOutputData" class="method item">
    <h3 class="name"><code>setOutputData</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
                <li class="arg">
                        <code>value</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l1394"><code>..&#x2F;src&#x2F;litegraph.js:1394</code></a>
        </p>



    </div>

    <div class="description">
        <p>Assign a data to the global output</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">value</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_start" class="method item">
    <h3 class="name"><code>start</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>interval</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l567"><code>..&#x2F;src&#x2F;litegraph.js:567</code></a>
        </p>



    </div>

    <div class="description">
        <p>Starts running this graph every interval milliseconds.</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">interval</code>
                        <span class="type">Number</span>


                    <div class="param-description">
                        <p>amount of milliseconds between executions, if 0 then it renders to the monitor refresh rate</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_stop execution" class="method item">
    <h3 class="name"><code>stop execution</code></h3>

        <span class="paren">()</span>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l609"><code>..&#x2F;src&#x2F;litegraph.js:609</code></a>
        </p>



    </div>

    <div class="description">
        <p>Stops the execution loop of the graph</p>

    </div>




</div>
<div id="method_updateExecutionOrder" class="method item">
    <h3 class="name"><code>updateExecutionOrder</code></h3>

        <span class="paren">()</span>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_litegraph.js.html#l716"><code>..&#x2F;src&#x2F;litegraph.js:716</code></a>
        </p>



    </div>

    <div class="description">
        <p>Updates the graph execution order according to relevance of the nodes (nodes with only outputs have more relevance than
nodes with only inputs.</p>

    </div>




</div>
            </div>



    </div>
</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>
